﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Mads.CoreDomain;

namespace Mads.Client
{
  public partial class MadsForm : Form
  {
    public MadsForm()
    {
      InitializeComponent();
      sessionId = trainManagerClient.InitUser();
    }
    
    private int sessionId;
    TrainManagerClient trainManagerClient = new TrainManagerClient();

    private void MadsForm_Load(object sender, EventArgs e)
    {

    }

    private void bGetTicket_Click(object sender, EventArgs e)
    {
      //FreeTicket[] freeTickets = trainManagerClient.GetTickets(sessionId, dtpDeparture.Value.Date, tbDeparture.Text, tbArrival.Text);

      //foreach (FreeTicket ticket in freeTickets)
      //{
      //  lvRaces.Items.Add(new ListViewItem(new string[]{ticket.RouteNumber.ToString(), ticket.DepartureTime.ToString(), ticket.ArrivalTime.ToString(),
      //    ticket.SitNumber.ToString(), ticket.Price.ToString()}));
      //}
    }
  }
}
